-- GENERATED SPELL FOR [Ymirheim Chosen Warrior] --


function spell0_31258(pUnit, Event) --@Bloodthirst,n/a--
pUnit:FullCastSpellOnTarget(35949,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31258', 0, 1)
end

function spell1_31258(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31258', 608, 1)
end

function spell2_31258(pUnit, Event) --@Jump Attack,n/a--
pUnit:FullCastSpellOnTarget(61227,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31258', 629, 1)
end

function Sorts_31258(pUnit, Event)
local choix_sorts_31258 = math.random(0, 2)
if choix_sorts_31258 == 0 then
pUnit:RegisterEvent('spell0_31258', 1, 1)
end
if choix_sorts_31258 == 1 then
pUnit:RegisterEvent('spell1_31258', 1, 1)
end
if choix_sorts_31258 == 2 then
pUnit:RegisterEvent('spell2_31258', 1, 1)
end
end

function mob31258_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31258', math.random(1500, 3000), 1)
end

function mob31258_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31258_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31258_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31258, 1, 'mob31258_Action')
RegisterUnitEvent(31258, 2, 'mob31258_Leave')
RegisterUnitEvent(31258, 3, 'mob31258_Kill')
RegisterUnitEvent(31258, 4, 'mob31258_Die')
